package filehomework;

import java.io.File;
import java.io.FileFilter;

public class test062 {
    public static void main(String[] args) {

        File str =new File("./src/filehomework");
        if(str.isDirectory()) {
            FileFilter filter = new FileFilter() {
                @Override
                public boolean accept(File file) {
                    String name = file.getName();
                    return name.contains("s");
                }
            };


            File[] subs = str.listFiles(filter);
            for (File sub : subs) {
                System.out.println(sub);
            }
        }
    }
}
